import React from 'react';
import { Router, Route, Switch } from 'dva/router';
// import IndexPage from './routes/IndexPage';
import Main from './routes/Main/Main';
import CardIdnex from './routes/Card/CardIndex';
import Login from './routes/Login/Login';
import IDCard from './components/Common/IDCard/IDCard';
import LossAndReplace from './routes/LossAndReplace/LossAndReplace';

import GetCard from './routes/GetCard/GetCard'
import EditInfo from './components/CardProcess/EditInfo/EditInfo';
import Test1 from './components/testData/test1';
import Test2 from './components/testData/test2';
import Verify from './components/LossAndReplace/Verify/Verify';
import Affirm from './components/LossAndReplace/Afirm/Affirm';
import MainLayout from './components/MainLayout/MainLayout';
import TestAxios from './components/testData/testAxios';

function RouterConfig({ history }) {
  return (
    <Router history={history}>
      <Switch>
        <Route path="/" exact component={Main} />
        <Route path="/cardIndex" component={CardIdnex} />
        <Route path="/getCard" component={GetCard} />
        <Route path="/test" component={TestAxios} />
        <Route path="/lossandreplace" component={LossAndReplace} />
        <Route path="/verify" component={Verify} />
        <Route path="/affirm" component={Affirm} />
        <Route path="/mainlayout" component={MainLayout} />
      </Switch>
    </Router>
  );
}

export default RouterConfig;
